
#include <iostream>
#include <stdlib.h>
#include <stdio.h>

using namespace std;

class Car{
};
class User
{
    private:
        int age;
        Car *car;
    public:
        void setAge(int age){
            this -> age = age;
        }
        int getAge(){
            return this -> age;
        }
        void setCar(Car *car){
            this -> car = car;
        }
        Car* getCar(){
            return this -> car;
        }
};


int main()
{	
    User u;
    Car c;
    u.setCar(&c);
    Car *c2 = u.getCar();

    printf("addr1=%#X, addr2=%#X, equals: %d\n ", &c, c2, &c == c2);

	system("pause");
	return 0;
}
